import { onMounted, onUpdated } from 'vue'

export function useTitle(count) {
  // 生命周期的钩子函数使用
  onMounted(() => {
    console.log('onMounted')
    document.title = `count: ${count.value}`
  })
  onUpdated(() => {
    console.log('onUpdated')
    document.title = `count: ${count.value}`
  })
}
